package java基础.base;

/**
 * @projectName: JAVA编程
 * @package: PACKAGE_NAME
 * @className: base.Demo02
 * @author: IT_Jay
 * @description: TODO
 * @date: 2021/11/14 21:23
 */
public class Demo02 {
    public static void main(String[] args) {
        //八大基本数据类型

        //整数
        int num1 = 10;          //常用
        byte num2 = 20;
        short num3 = 30;
        long num4 = 40L;        //Long型要在数字后加L

        //小数，浮点数
        float num5 = 50.1F;     //float型要在数字后加F
        double num6 = 3.14159265;

        //字符
        char name = '我';        //两个字节，一个汉字
        //字符串
        String namea = "周杰伦";     //注意String颜色，String不是关键字，而是类

        //布尔型 返回True或false
        boolean flag = true;
        System.out.println("num1:"+num1);
        System.out.println("num2:"+num2);
        System.out.println("num3:"+num3);
        System.out.println("num4:"+num4);
        System.out.println("num5:"+num5);
        System.out.println("num6:"+num6);
        System.out.println("name:"+name);
        System.out.println("namea:"+namea);
        System.out.println("flag:"+flag);
    }
}
